﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Entities;
using DAL;

namespace BLL
{
    public class SanPhamBLL
    {
        public static List<SanPham> LayTatCa()
        {
            return SanPhamDAL.LayTatCa();
        }
        public static SanPham TimDon(string masp)
        {
            return SanPhamDAL.TimDon(masp);
        }
        public static bool Them(SanPham sp)
        {
            return SanPhamDAL.Them(sp);
        }
        public static bool Xoa(string masp)
        {
            return SanPhamDAL.Xoa(masp);
        }
        public static bool Sua(SanPham masp)
        {
            return SanPhamDAL.Sua(masp);
        }
        public static List<SanPham> SanPham_TrongChuDe(string machude, string page, out int howmanypages)
        {
            return SanPhamDAL.TrongChuDe(machude, page,out howmanypages);
        }
        public static List<SanPham> SanPham_HienThi(string page, out int howManyPages)
        {
            return SanPhamDAL.SanPham_HienThi(page, out howManyPages);
        }

        public static List<SanPham> TimTheoTen(string ten)
        {
            return SanPhamDAL.TimTheoTen(ten);
        }
        public static List<SanPham> TimTheoTenChuDe(string chude)
        {
            return SanPhamDAL.TimTheoTenChuDe(chude);
        }
        public static List<SanPham> TimTheoTenLoaiSP(string loaisp)
        {
            return SanPhamDAL.TimTheoTenLoaiSP(loaisp);
        }
        public static List<SanPham> TimTheoGia(double gia1, double gia2)
        {
            return SanPhamDAL.TimTheoGia(gia1, gia2);
        }
        public static List<SanPham> TimKiem(string ten,double gia1, double gia2)
        {
            return SanPhamDAL.TimKiem(ten,gia1, gia2);
        }
        public static bool SanPham_CapNhatHienThi(string Id, bool hienthi)
        {
            return SanPhamDAL.CapNhatHienThi(Id, hienthi);
        }
    }
}
